From: Jonas Dreßler Date: Thu, 4 Jun 2020 15:39:44 +0000 (+0200) Subject: workspace: Set maxChromeWidth to window clone width X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~267 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2b4317349feb7a9a4e594c0994625c9ca6c46962;p=gnome-shell.git workspace: Set maxChromeWidth to window clone width So far we allowed the titles of window overlays to expand their width to be larger than the actual WindowClone, they could expand to the full size of the Workspace. Since we're now going to implement those titles as part of the WindowClone itself, having this feature is no longer possible as easily as it was before. That's because the clones are stacked according to the stacking of the actual windows, and since the overlay-elements are attached to those clones, they will also be shown underneath other clones. So stop allowing the titles to expand and limit their size to the width of the clone, which makes sure titles never get shown above or underneath other clones. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index a64ed0b99..a6967f302 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1627,11 +1627,7 @@ class Workspace extends St.Widget { const cloneHeight = cellHeight; clone.slot = [x, y, cloneWidth, cloneHeight]; - let cloneCenter = x + cloneWidth / 2; - let maxChromeWidth = 2 * Math.min( - cloneCenter - area.x, - area.x + area.width - cloneCenter); - clone.overlay.setMaxChromeWidth(Math.round(maxChromeWidth)); + clone.overlay.setMaxChromeWidth(cloneWidth); if (clone.overlay && (initialPositioning || !clone.positioned)) clone.overlay.hide();